<div ng-controller="chainEditCtrl">
    <div class="bg-light lter b-b wrapper-md ng-scope">
        <h4 class="m-n font-thin">品牌信息设置</h4>
        <button onClick="javascript: history.go(-1);" class="btn-back btn btn-dark btn-sm btn-rounded">
            返回
        </button>
    </div>

    <div class="wrapper-md">
        <div class="panel">
            <div class="panel-body">
                <div class="chain_header_container">
                    <div class="chain_header_item chain_header_item_active">
                        <span class="chain_header_item_span">品牌基本信息</span>
                        <div class="tran-right"></div>
                    </div>
                    <div class="chain_header_item">
                        <div class="tran-left"></div>
                        <span class="chain_header_item_span">品牌营业执照信息</span>
                    </div>
                </div>
                <form class="form-horizontal form-validation" name="chainForm"  ng-submit="updateChain()">
                    <div>
                        <div class="padder-md padder-v bg-light m-b-sm">
                            <span class="font-bold">基本信息</span>
                            <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="top" popover="品牌的基本信息,包含名字地址等" popover-trigger="mouseenter"></i>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌名称</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" ng-model="chain.name" placeholder="请输入品牌名称" required/>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌联系人</label>
                            <div class='col-sm-5'>
                                <input type="text" class="form-control" ng-model="chain.linkman" placeholder="请输入品牌联系人姓名" required/>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌联系电话</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" ng-model="chain.mobilePhone" placeholder="请输入品牌电话" required/>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌行业名称</label>
                            <div class="col-sm-5">
                                <select class="input-sm form-control m-b-sm" ng-model="chain.industryId" ng-options="item.id as item.fullName for item in industrySel"  required>
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌套餐名称</label>
                            <div class="col-sm-5">
                                <select class="input-sm form-control m-b-sm" ng-model="chain.setMealId" ng-options="item.id as item.name for item in setMealSel" disabled>
                                    <option value="">请选择</option>
                                </select>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group wrapper bg-white ">
                            <label class="col-sm-2 control-label font-bold">品牌审核状态</label>
                            <div class="row padder-md">
                                <ul class="pull-left nav nav-pills nav-sm" >
                                    <li  ng-if="chain.auditStatus == 0 ">
                                        <span class="label bg-light">等待审核中</span>
                                    </li>
                                    <li class="inline"  ng-if="chain.auditStatus == 1 ">
                                        <span class="label bg-danger">等待不通过</span>
                                        <i class="inline m-l-xs fa fa-question-circle text-muted pos-rlt h6" popover-placement="right" popover="{{chain.auditFailDescription}}" popover-trigger="mouseenter"></i>
                                    </li>
                                    <li  ng-if="chain.auditStatus == 2 ">
                                        <span class="label bg-success">审核通过</span>
                                    </li>
                                </ul>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌商户数量</label>
                            <div class='col-sm-5'>
                                <input type="text" class="form-control" ng-model="chain.count" placeholder="请输入品牌商户数量" disabled/>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold" ng-model="chain.isExpire">品牌是否到期</label>
                            <div class="col-sm-5">
                                <span type="text" class="form-control" ng-if="chain.isExpire==0" placeholder="请输入品牌是否到期" disabled>未到期</span>
                                <span type="text" class="form-control" ng-if="chain.isExpire==1" placeholder="请输入品牌是否到期" disabled>已到期</span>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                        <div class="form-group">
                            <label class="col-sm-2 control-label font-bold">品牌到期时间</label>
                            <div class="col-sm-5">
                                <input type="text" class="form-control" ng-model="chain.expireTime" placeholder="请输入品牌到期日期" disabled/>
                            </div>
                            <div class="clearfix"></div>
                        </div>
                    </div>
                    <div class="line line-dashed b-b line-lg pull-in"></div>
                    <div class="form-group">
                        <div class="col-sm-4 col-sm-offset-2">
                            <div class="inline m-r-xs">
                                <button type="submit" ng-if="!updateState" class="btn btn-success" ng-disabled="chainForm.$invalid||chainForm.$pristine">保存</button>
                                <button ng-if="updateState" class="btn btn-success" disabled><i class="fa fa-spin fa-refresh m-r-xs"></i>保存中..</button>
                            </div>
                        </div>
                        <div class="clearfix"></div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</div>
